package com.example.yls.demoa;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.EditText;

public class StudentActivity extends AppCompatActivity {
    private EditText edtNo;
    private EditText edtName;
    private EditText edtBirth;
    private EditText edtPhone;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_student);

        initEditTexts();
    }

    private void initEditTexts() {
        edtNo = findViewById(R.id.edt_no);
        edtBirth = findViewById(R.id.edt_birth);
        edtName = findViewById(R.id.edt_name);
        edtPhone = findViewById(R.id.edt_phone);

        String no = getIntent().getStringExtra("NO");
        String name = getIntent().getStringExtra("NAME");
        String birth = getIntent().getStringExtra("BIRTH");
        String phone = getIntent().getStringExtra("PHONE");

        edtNo.setText(no);
        edtBirth.setText(birth);
        edtName.setText(name);
        edtPhone.setText(phone);

    }
}

